package com.neoCalf.neoGroup.feigns;

import com.neoCalf.neoCommon.entity.UserContact;
import com.neoCalf.neoCommon.model.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "contactService", path = "/api")
public interface ContactServiceFeign {
    /**
     * 查询群聊人数
     *
     * @param groupId
     * @return
     */
    @PostMapping("/contact/findGroupMemberCount")
    R<Long> findGroupMemberCount(@RequestParam("groupId") String groupId);

    /**
     * 查询群聊成员
     *
     * @param groupId
     * @return
     */
    @PostMapping("/contact/findGroupMember")
    R<List<UserContact>> findGroupMember(@RequestParam("groupId") String groupId);

    /**
     * 新增群聊成员
     *
     * @param userContact
     * @return
     */
    @PostMapping("/contact/addGroupContact")
    R<String> addGroupContact(@RequestBody UserContact userContact);
}
